import request from '@/utils/request'

// 房屋抗震能力评估计算
export function countSeismic(data) {
  return request({
    url: '/assessplot/houseSeismic/countSeismic',
    method: 'post',
    data: data
  })
}

// 房屋抗震能力评估计算格网
export function countSeismic1(data) {
  return request({
    url: '/assessplot/houseSeismic/countSeismicByYPG',
    method: 'post',
    data: data
  })
}

// 房屋抗震能力评估
export function seismicAssess(data) {
    return request({
      // url: '/fxfzaqbz/seismic/countSeismic',
      url: '/assessplot/houseSeismic/seismicPlot',
      method: 'post',
      data: data
    })
  }

// 查询评估结果
export function resultLists(data){
  return request({
    url: '/assessplot/evaluationResults/getAll',
    method: 'get',
    params: data
  })
}
// 仅保存结果
export function saveResult(data){
    return request({
      url: '/assessplot/evaluationResults/save',
      method: 'post',
      data: data
    })
}
// 房屋破坏评估计算
  export function houseDestory(data) {
    return request({
      url: '/assessplot/houseSeismic/houseDestory',
      method: 'post',
      data: data
    })
  }

  // 房屋破坏评估
export function destructionAssess(data) {
    return request({
      // url: '/fxfzaqbz/seismic/houseDestory',
      url: '/assessplot/houseSeismic/housePlot',
      method: 'post',
      data: data
    })
  }

    // 获取图件模板
export function getPicReport(query) {
    return request({
      url: '/map/getTypeNameByType/'+query,
      method: 'get',
    })
  }

  // 上传房屋地震灾害风险评估
export function uploadHouse(data) {
    return request({
      url: '/fxfzaqbz/data/saveDisasterAss',
      method: 'post',
      data: data,
    })
  }

  // 获取结果分析
  export function analyzeList(data) {
    return request({
      url: '/data/resultAnalysis/getResult',
      method: 'get',
      params:data
    })
  }

// 获取评估结果
export function resultAnalysis(data) {
  return request({
    url: '/data/resultAnalysis/getPage',
    method: 'get',
    params:data
  })
}

  // 统计
  export function statistics(data) {
    return request({
      url: '/data/resultAnalysis/statistics',
      method: 'get',
      params:data
    })
  }

  // 展示
  export function showdata(data) {
    return request({
      url: '/data/resultAnalysis/statistics',
      method: 'get',
      params:data
    })
  }